package cn.gzjp.modules.dt.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.validator.constraints.Length;

import cn.gzjp.common.persistence.DataEntity;
import cn.gzjp.common.utils.excel.annotation.ExcelField;

import java.util.Date;

/**
 * 题目选项Entity
 * @author zengcp
 * @version 2018-02-24
 */
public class QuestionOption extends DataEntity<QuestionOption> {
	
	private static final long serialVersionUID = 1L;
	private String text;		// text
	private String option;		// 选项
	private Question question;		// 题目
	
	public QuestionOption() {
		super();
	}

	public QuestionOption(String id){
		super(id);
	}

	@Length(min=0, max=256, message="text长度必须介于 0 和 256 之间")
	@ExcelField(title="text", align=2, sort=1)
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}


	public String getOption() {
		return option;
	}

	public void setOption(String option) {
		this.option = option;
	}

	@JsonIgnore
	public Question getQuestion() {
		return question;
	}

	public void setQuestion(Question question) {
		this.question = question;
	}

	@JsonIgnore
	public String getId(){
		return this.id;
	}
	@JsonIgnore
	public Date getCreateDate() {
		return createDate;
	}
}